#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
#define eps 1e-8
#define zero(x) zero(((x)>0?(x):(-x))<eps)
using namespace std;

struct point
{
    int x, y;
};

bool operator < ( const point &a, const point &b )
{
    return a.x < b.x;
}

long long xmult( point p0, point p1, point p2 )
{
    long long a = p1.x - p0.x, b = p2.y - p0.y, c = p2.x - p0.x, d = p1.y - p0.y;
    return a * b - c * d;
}

int n, m, f[ 101 ][ 101 ];
point p1[ 101 ], p2[ 1001 ];

void init( )
{
    int i, j, k;
    for ( i = 0; i < n; i++ )
        scanf("%d%d", &p1[ i ].x, &p1[ i ].y);
    for ( i = 0; i < m; i++ )
        scanf("%d%d", &p2[ i ].x, &p2[ i ].y);
    sort( p1, p1 + n );
    memset( f, 0, sizeof ( f ) );
    for ( i = 0; i < n; i++ )
        for ( j = i + 1; j < n; j++ )
            for ( k = 0; k < m; k++ )
                if ( p2[ k ].x >= p1[ i ].x && p2[ k ].x <= p1[ j ].x && xmult( p1[ i ], p2[ k ], p1[ j ] ) < 0 )
                    f[ i ][ j ]++;
}

bool in_triangle( point p, point a, point b, point c )
{
    int q1, q2, q3;
    point t;
    if ( b.y < c.y )
    {
        t = b;
        b = c;
        c = t;
    }
    q1 = xmult( a, b, p );
    q2 = xmult( b, c, p );
    q3 = xmult( c, a, p );
    if ( q1 > 0 || q2 > 0 || q3 > 0 ) return false;
    return true;
}

int mabs( int a ) { return ( a < 0 )? -a: a; }

void work( )
{
    int i, j, k, l, ans = 0;
    for ( i = 0; i < n; i++ )
        for ( j = i + 1; j < n; j++ )
            for ( k = j + 1; k < n; k++ )
                if ( mabs( f[ i ][ k ] - f[ i ][ j ] - f[ j ][ k ] ) & 1 )
                    ans++;
    printf("%d\n", ans);
}

int main( )
{
    int cas = 1;
    while ( scanf("%d%d", &n, &m) != EOF )
    {
        init( );
        printf("Case %d: ", cas++);
        work( );
    }
    return 0;
}
